package com.zmj.demo01;

import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.text.SimpleDateFormat;
import java.util.Date;



public class MyJob implements Job {

    public void execute(JobExecutionContext context) throws JobExecutionException {

        System.out.println("hello world!!"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss EEE").format(new Date()));
        JobDataMap map =  context.getJobDetail().getJobDataMap();
        System.out.println(context.getJobDetail().getKey());
        if (map!=null){
            System.out.println(map.get("stuName"));
            System.out.println(map.get("tbItems"));
        }

    }
}
